package com.haixiaoke.saas.repository.mapper;

import com.haixiaoke.saas.repository.pojo.AppUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户表Mapper接口
 *
 * @author panda
 * @date 2023-04-20
 */
@Mapper
public interface AppUserMapper {
    /**
     * 查询用户表
     *
     * @param id 用户表主键
     * @return 用户表
     */
    String selectAppUserById(String id);

    String selectPhoneByOrgId(Long orgId);

    String selectOpenIdById(String id);

    int updateMobileDevicesId(@Param("mobileDevicesId") String mobileDevicesId, @Param("userId") String userId);

    List<AppUser> selectMobileDevicesIdByOrgId(Long orgId);

    int updateMobileDevicesIdByEnterpriseUserId(@Param("mobileDevicesId") String mobileDevicesId, @Param("userId") String userId);

    AppUser selectAppUserByEnterpriseUserId(String mobileDevicesId);

    AppUser selectAppUserByUserId(String userId);
}
